'use strict';

/**
 * @description 入住人信息表模型
 * */
module.exports = app => {
  const { STRING, INTEGER, BOOLEAN } = app.Sequelize;

  const Person = app.model.define('person', {
    name: {
      type: STRING(20),
      allowNull: false,
      comment: '真实姓名',
    },
    No: {
      type: STRING(40),
      allowNull: false,
      comment: '证件号码',
    },
    isMy: {
      type: BOOLEAN,
      allowNull: false,
      defaultValue: false,
      comment: '是否是自己',
    },
    uid: {
      type: INTEGER,
      allowNull: false,
      comment: '用户id',
    },
  });

  return Person;
};
